<template>
    <div class="home-container">
   
    </div>
</template>

<script setup lang="ts" name="home">
import { storeToRefs } from 'pinia';
import { useUserStore } from '@/store/user';
import { useKeepAliveStore } from '@/store/keepAlive';

const userStore = useUserStore()

const { userInfo } = storeToRefs(userStore)

const keepAliveStore = useKeepAliveStore()

if (userInfo.value.tabList.length == 0) {
    userStore.addTab({ name: '首页', path: '/home', icon: 'HomeFilled', routeName: 'home' })
    keepAliveStore.addKeepAliveName('home')
}
</script>

<style scoped>
.home-container{
    background-image: url("@/assets/images/login.jpg");
    /* 背景图垂直、水平均居中 */
    background-position: center center;
    /* 背景图不平铺 */
    background-repeat: no-repeat;
    /* 让背景图基于容器大小伸缩 */
    background-size: cover;
}
</style>